-----------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/pierostanig/Library/CloudStorage/OneDrive-UniversitàCommercialeLuigiBocconi/CPS paper/
> ChanReplication.log
  log type:  text
 opened on:  28 May 2024, 16:28:03

. do "/var/folders/4v/l_kzq6cx503f17nkqddpdp040000gn/T//SD04790.000000"

. 
. ***The replication folder contains: 
. ** a) crosswalk from nuts2015 to nuts2018;
. ** b) latent class analysis results
. ** c) the two crosswalks needed to map the local authorities (in the Special Licence dataset SN 6666)
. ** to the NUTS regions 
. 
. ** It is responsibility of the user to obtain the following:
. 
. ** 1) SPECIAL LICENCE UKHLS DATA with geographic identifiers for respondents
. 
. *** You need to obtain Special Licence dataset SN 6666 - Understanding Society: Waves 1-11, 2009-2020 
. *** Follow the instructions at https://www.understandingsociety.ac.uk/documentation/access-data/
. *** Then place the folder UKDA-6666-stata in the ChanBrexitReplication subfolder.
. 
. 
. *** 2) UKHLS SURVEY DATA with individual and household information
. 
. *** You need to obtain the ukhls data following 
. *** the instructions provided at
. *** https://www.understandingsociety.ac.uk/documentation/access-data/
. *** The code here assumes you obtained the UKDA-6614-stata files. 
. *** The waves used are wave 8 and waves 1-6. This means files with names up to h. 
. *** Place the entire folder UKDA-6614-stata in the ChanBrexitReplication subfolder.
. 
. *** 3) COLANTONE/STANIG China shock data
. 
. **** You need to obtain Replication_DB_Regional.dta from https://doi.org/10.7910/DVN/AL1A4Q 
. **** and place it in the ChanBrexitReplication subfolder.
. **** This is the official replication data for Colantone and Stanig (2018)
. 
. *** IMPORTANT!
. 
. *** Before running this Stata do file, you'll need to run Prepare_a_hidp_NUTS_Replication.R, after having
>  placed the 
. *** restricted UKDA-6666-stata folder, obtained as per instructions above, in the ChanBrexitReplication f
> older.
. *** That piece of code will create a dataset, ukhls.ids.dta, that associates to every respondent the NUTS
> 3 region
. *** of residence. After running, check whether ukhls.ids.dta is created and located in the ChanBrexitRepl
> ication subfolder.
. 
. use "./ChanBrexitReplication/ukhls.ids.dta",replace
(Written by R.              )

. 
. *** This should be a dataset with columns hidp wave NUTS318CD NUTS318NM (created from the R script above)
. 
. keep if wave=="h"
(381,169 observations deleted)

. 
. gen nuts318cd=NUTS318CD

. 
. gen NUTS1=substr(NUTS318CD,1,3)

. 
. *drop if NUTS1=="UKN"
. 
. merge m:1 nuts318cd using "./ChanBrexitReplication/n15to18cw.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                         1,679
        from master                     1,679  (_merge==1)
        from using                          0  (_merge==2)

    matched                            25,526  (_merge==3)
    -----------------------------------------

. 
. gen NUTS2=substr(nuts315cd,1,4)
(1,679 missing values generated)

. 
. gen NUTS_code=nuts315cd
(1,679 missing values generated)

. 
. duplicates tag hidp wave, gen(duplo)

Duplicates in terms of hidp wave

. 
. replace NUTS_code=NUTS2 if duplo>0
(956 real changes made)

. 
. bys hidp wave NUTS_c: keep if _n==1
(578 observations deleted)

. 
. duplicates tag hidp wave, gen(basicdupli)

Duplicates in terms of hidp wave

. 
. replace NUTS_code=NUTS1 if basic>0
(238 real changes made)

. 
. drop basic duplo

. 
. bys hidp wave NUTS_c: keep if _n==1
(119 observations deleted)

. 
. drop _me 

. 
. save "./ChanBrexitReplication/ukhls.nuts.dta", replace
file ./ChanBrexitReplication/ukhls.nuts.dta saved

. 
. use "./ChanBrexitReplication/Replication_DB_Regional.dta", clear
(Written by R.              )

. 
. keep nuts1 nuts2 nuts3 import_shock instrument_for_shock immigrant_share immigrant_arrivals

. 
. tab nuts3

NUTS-3 code |      Freq.     Percent        Cum.
------------+-----------------------------------
      UKC11 |          1        0.60        0.60
      UKC12 |          1        0.60        1.20
      UKC13 |          1        0.60        1.80
      UKC14 |          1        0.60        2.40
      UKC21 |          1        0.60        2.99
      UKC22 |          1        0.60        3.59
      UKC23 |          1        0.60        4.19
      UKD11 |          1        0.60        4.79
      UKD12 |          1        0.60        5.39
      UKD33 |          1        0.60        5.99
      UKD34 |          1        0.60        6.59
      UKD35 |          1        0.60        7.19
      UKD36 |          1        0.60        7.78
      UKD37 |          1        0.60        8.38
      UKD41 |          1        0.60        8.98
      UKD42 |          1        0.60        9.58
      UKD44 |          1        0.60       10.18
      UKD45 |          1        0.60       10.78
      UKD46 |          1        0.60       11.38
      UKD47 |          1        0.60       11.98
      UKD61 |          1        0.60       12.57
      UKD62 |          1        0.60       13.17
      UKD63 |          1        0.60       13.77
      UKD71 |          1        0.60       14.37
      UKD72 |          1        0.60       14.97
      UKD73 |          1        0.60       15.57
      UKD74 |          1        0.60       16.17
      UKE11 |          1        0.60       16.77
      UKE12 |          1        0.60       17.37
      UKE13 |          1        0.60       17.96
      UKE21 |          1        0.60       18.56
      UKE22 |          1        0.60       19.16
      UKE31 |          1        0.60       19.76
      UKE32 |          1        0.60       20.36
      UKE41 |          1        0.60       20.96
      UKE42 |          1        0.60       21.56
      UKE44 |          1        0.60       22.16
      UKE45 |          1        0.60       22.75
      UKF11 |          1        0.60       23.35
      UKF12 |          1        0.60       23.95
      UKF13 |          1        0.60       24.55
      UKF14 |          1        0.60       25.15
      UKF15 |          1        0.60       25.75
      UKF16 |          1        0.60       26.35
      UKF21 |          1        0.60       26.95
      UKF22 |          1        0.60       27.54
      UKF24 |          1        0.60       28.14
      UKF25 |          1        0.60       28.74
      UKF30 |          1        0.60       29.34
      UKG11 |          1        0.60       29.94
      UKG12 |          1        0.60       30.54
      UKG13 |          1        0.60       31.14
      UKG21 |          1        0.60       31.74
      UKG22 |          1        0.60       32.34
      UKG23 |          1        0.60       32.93
      UKG24 |          1        0.60       33.53
      UKG31 |          1        0.60       34.13
      UKG32 |          1        0.60       34.73
      UKG33 |          1        0.60       35.33
      UKG36 |          1        0.60       35.93
      UKG37 |          1        0.60       36.53
      UKG38 |          1        0.60       37.13
      UKG39 |          1        0.60       37.72
      UKH11 |          1        0.60       38.32
      UKH12 |          1        0.60       38.92
      UKH14 |          1        0.60       39.52
      UKH15 |          1        0.60       40.12
      UKH16 |          1        0.60       40.72
      UKH17 |          1        0.60       41.32
      UKH21 |          1        0.60       41.92
      UKH23 |          1        0.60       42.51
      UKH24 |          1        0.60       43.11
      UKH25 |          1        0.60       43.71
      UKH31 |          1        0.60       44.31
      UKH32 |          1        0.60       44.91
      UKH34 |          1        0.60       45.51
      UKH35 |          1        0.60       46.11
      UKH36 |          1        0.60       46.71
      UKH37 |          1        0.60       47.31
      UKI31 |          1        0.60       47.90
      UKI32 |          1        0.60       48.50
      UKI33 |          1        0.60       49.10
      UKI34 |          1        0.60       49.70
      UKI41 |          1        0.60       50.30
      UKI42 |          1        0.60       50.90
      UKI43 |          1        0.60       51.50
      UKI44 |          1        0.60       52.10
      UKI45 |          1        0.60       52.69
      UKI51 |          1        0.60       53.29
      UKI52 |          1        0.60       53.89
      UKI53 |          1        0.60       54.49
      UKI54 |          1        0.60       55.09
      UKI61 |          1        0.60       55.69
      UKI62 |          1        0.60       56.29
      UKI63 |          1        0.60       56.89
      UKI71 |          1        0.60       57.49
      UKI72 |          1        0.60       58.08
      UKI73 |          1        0.60       58.68
      UKI74 |          1        0.60       59.28
      UKI75 |          1        0.60       59.88
      UKJ11 |          1        0.60       60.48
      UKJ13 |          1        0.60       61.08
      UKJ14 |          1        0.60       61.68
      UKJ21 |          1        0.60       62.28
      UKJ22 |          1        0.60       62.87
      UKJ25 |          1        0.60       63.47
      UKJ26 |          1        0.60       64.07
      UKJ27 |          1        0.60       64.67
      UKJ28 |          1        0.60       65.27
      UKJ31 |          1        0.60       65.87
      UKJ32 |          1        0.60       66.47
      UKJ34 |          1        0.60       67.07
      UKJ35 |          1        0.60       67.66
      UKJ36 |          1        0.60       68.26
      UKJ37 |          1        0.60       68.86
      UKJ41 |          1        0.60       69.46
      UKJ43 |          1        0.60       70.06
      UKJ44 |          1        0.60       70.66
      UKJ45 |          1        0.60       71.26
      UKJ46 |          1        0.60       71.86
      UKK11 |          1        0.60       72.46
      UKK12 |          1        0.60       73.05
      UKK13 |          1        0.60       73.65
      UKK14 |          1        0.60       74.25
      UKK15 |          1        0.60       74.85
      UKK21 |          1        0.60       75.45
      UKK22 |          1        0.60       76.05
      UKK23 |          1        0.60       76.65
      UKK30 |          1        0.60       77.25
      UKK41 |          1        0.60       77.84
      UKK42 |          1        0.60       78.44
      UKK43 |          1        0.60       79.04
      UKL11 |          1        0.60       79.64
      UKL12 |          1        0.60       80.24
      UKL13 |          1        0.60       80.84
      UKL14 |          1        0.60       81.44
      UKL15 |          1        0.60       82.04
      UKL16 |          1        0.60       82.63
      UKL17 |          1        0.60       83.23
      UKL18 |          1        0.60       83.83
      UKL21 |          1        0.60       84.43
      UKL22 |          1        0.60       85.03
      UKL23 |          1        0.60       85.63
      UKL24 |          1        0.60       86.23
      UKM21 |          1        0.60       86.83
      UKM22 |          1        0.60       87.43
      UKM23 |          1        0.60       88.02
      UKM24 |          1        0.60       88.62
      UKM25 |          1        0.60       89.22
      UKM26 |          1        0.60       89.82
      UKM27 |          1        0.60       90.42
      UKM28 |          1        0.60       91.02
      UKM31 |          1        0.60       91.62
      UKM32 |          1        0.60       92.22
      UKM33 |          1        0.60       92.81
      UKM34 |          1        0.60       93.41
      UKM35 |          1        0.60       94.01
      UKM36 |          1        0.60       94.61
      UKM37 |          1        0.60       95.21
      UKM38 |          1        0.60       95.81
      UKM50 |          1        0.60       96.41
      UKM61 |          1        0.60       97.01
      UKM62 |          1        0.60       97.60
      UKM63 |          1        0.60       98.20
      UKM64 |          1        0.60       98.80
      UKM65 |          1        0.60       99.40
      UKM66 |          1        0.60      100.00
------------+-----------------------------------
      Total |        167      100.00

. 
. rename nuts3 NUTS_code

. 
. decode nuts1, gen(n1)

. 
. drop nuts1

. 
. rename n1 nuts1

. 
. save "./ChanBrexitReplication/ChinaN3.dta", replace
file ./ChanBrexitReplication/ChinaN3.dta saved

. 
. use "./ChanBrexitReplication/Replication_DB_Regional.dta", clear
(Written by R.              )

. 
. keep nuts1 nuts2 nuts3 import_shock instrument_for_shock immigrant_share immigrant_arrivals

. 
. decode nuts1, gen (n1t)

. 
. drop nuts1

. 
. rename n1t nuts1

. 
. keep if nuts1=="UKM"
(144 observations deleted)

. 
. collapse (mean) import_shock instrument_for_shock immigrant*, by(nuts2)

. 
. rename nuts2 NUTS_code

. 
. save "./ChanBrexitReplication/ChinaN2.dta", replace
file ./ChanBrexitReplication/ChinaN2.dta saved

. 
. use "./ChanBrexitReplication/Replication_DB_Regional.dta", clear
(Written by R.              )

. 
. keep nuts1 nuts2 nuts3 import_shock instrument_for_shock immigrant_share immigrant_arrivals

. 
. decode nuts1, gen (n1t)

. 
. drop nuts1

. 
. rename n1t nuts1

. 
. keep if nuts1=="UKM"
(144 observations deleted)

. 
. collapse (mean) import_shock instrument_for_shock immigrant*, by(nuts1)

. 
. rename nuts1 NUTS_code

. 
. save "./ChanBrexitReplication/ChinaN1.dta", replace
file ./ChanBrexitReplication/ChinaN1.dta saved

. 
. use "./ChanBrexitReplication/ChinaN3.dta",clear
(Written by R.              )

. 
. append using "./ChanBrexitReplication/ChinaN2.dta"

. 
. append using "./ChanBrexitReplication/ChinaN1.dta"

. 
. save  "./ChanBrexitReplication/ChinaShock.dta", replace
file ./ChanBrexitReplication/ChinaShock.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/a_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp a_natid1 a_natid2 a_natid3 a_natid4 a_natid5 a_natid6 a_natid97 a_britid  a_citzn1 a_ukborn

.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave1.dta", replace 
file ./ChanBrexitReplication/ReconstructedReplicationData/wave1.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/b_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp b_natid1-b_natid97 b_arts2a1-b_arts2freq b_mla3 b_citzn1 b_ukborn

.  
. **arts kept here even if the paper claims the measure is based on wave 3. 
.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave2.dta", replace 
file ./ChanBrexitReplication/ReconstructedReplicationData/wave2.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/c_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp c_natid* c_britid  c_citzn1 c_ukborn

.  
. ** arts are not in 3, so take them for 2. 
.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave3.dta", replace 
file ./ChanBrexitReplication/ReconstructedReplicationData/wave3.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/d_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp d_natid* d_citzn1 d_ukborn

.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave4.dta", replace 
file ./ChanBrexitReplication/ReconstructedReplicationData/wave4.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/e_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp e_natid* e_arts2a1- e_arts2freq e_mla3 e_citzn1 e_ukborn

.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave5.dta", replace 
file ./ChanBrexitReplication/ReconstructedReplicationData/wave5.dta saved

. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/f_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp f_natid* f_britid f_citzn1 f_citznyear f_ukborn

.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave6.dta", replace
file ./ChanBrexitReplication/ReconstructedReplicationData/wave6.dta saved

.  
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/g_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp  g_ukborn g_ff_ukborn

.  
. save  "./ChanBrexitReplication/ReconstructedReplicationData/wave7.dta", replace
file ./ChanBrexitReplication/ReconstructedReplicationData/wave7.dta saved

.  
. *** The poverty level will be taken from the household-level data
.  
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/h_hhresp.dta"
(Substantive data from responding households)

. /*
> To determine relative poverty status, first compute the equivalized household income by dividing 
> the total household income by the square root of household size. 
> Following a convention in poverty research (Jenkins, 2011), the relative poverty line
> is set as 60% of the sample median of the equivalized household income. 
> */
.  
. *Square root of family size
. 
. gen peopleroot =(h_nchoecd_dv +h_nadoecd_dv)^.5

. 
. gen equivalized_income= h_fihhmngrs_dv/peopleroot

. 
. *Hard-coded the sample median
. 
. gen poor = equivalized<.6*1891.063 

. 
. keep h_hidp equivalized poor

. 
. save "./ChanBrexitReplication/poverty_dummy.dta", replace
file ./ChanBrexitReplication/poverty_dummy.dta saved

.  
. *** now the main one 
. 
. use "./ChanBrexitReplication/UKDA-6614-stata/stata/stata13_se/ukhls/h_indresp.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. keep pidp h_hidp h_eumem h_dvage h_sex h_ethn_dv h_racel_dv h_jbnssec8_dv  h_marstat_dv h_nch* h_qfhigh_d
> v h_indinui_xw h_citzn1 h_ukborn h_istr* h_pbirthy

.  
. *** Creat interview date variable
.  
. replace h_istrtdaty=. if h_istrtdaty<0
(5 real changes made, 5 to missing)

. 
. replace h_istrtdatm=. if h_istrtdatm<0
(5 real changes made, 5 to missing)

. 
. replace h_istrtdatd=. if h_istrtdatd<0
(5 real changes made, 5 to missing)

. 
. gen slash="/"

. 
. egen date=concat(h_istrtdatd slash h_istrtdatm slash h_istrtdaty)

. 
. gen proper_date=date(date, "DMY")
(5 missing values generated)

. 
. gen brexit=date("23/06/2016", "DMY")

. 
. gen when_interview = proper_date-brexit
(5 missing values generated)

. 
. gen after=when
(5 missing values generated)

. 
. replace after=0 if when<0
(9,583 real changes made)

. 
. replace when =0 if when>=0
(29,677 real changes made)

.  
. gen age_at_brexit=2016- h_pbirthy

.  
. *** now here exclude observations with missing data on Leave vote
.  
. gen leave=h_eumem

.  
. replace leave=. if leave<0
(5,018 real changes made, 5,018 to missing)

. 
. replace leave=leave-1
(34,275 real changes made)

. 
. tab leave

      leave |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     20,050       58.50       58.50
          1 |     14,225       41.50      100.00
------------+-----------------------------------
      Total |     34,275      100.00

. 
. * merge the previous waves to the Wave 8 (aka "h") master data
. 
. forvalues i=1 2 to 7{
  2. 
.                 merge 1:1 pidp using  "./ChanBrexitReplication/ReconstructedReplicationData/wave`i'.dta",
>  keep(master match)
  3. 
.                 rename _merge merged`i'
  4. 
. }

    Result                           # of obs.
    -----------------------------------------
    not matched                        17,637
        from master                    17,637  (_merge==1)
        from using                          0  (_merge==2)

    matched                            21,656  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                        10,525
        from master                    10,525  (_merge==1)
        from using                          0  (_merge==2)

    matched                            28,768  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                         9,746
        from master                     9,746  (_merge==1)
        from using                          0  (_merge==2)

    matched                            29,547  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                         8,737
        from master                     8,737  (_merge==1)
        from using                          0  (_merge==2)

    matched                            30,556  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                         8,115
        from master                     8,115  (_merge==1)
        from using                          0  (_merge==2)

    matched                            31,178  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                         5,161
        from master                     5,161  (_merge==1)
        from using                          0  (_merge==2)

    matched                            34,132  (_merge==3)
    -----------------------------------------

    Result                           # of obs.
    -----------------------------------------
    not matched                         3,952
        from master                     3,952  (_merge==1)
        from using                          0  (_merge==2)

    matched                            35,341  (_merge==3)
    -----------------------------------------

. 
. *** sort out citizenship
. 
. foreach var of varlist *citzn1{
  2. 
.                 replace `var'=. if `var'<0
  3. 
. }
(36,978 real changes made, 36,978 to missing)
(18,613 real changes made, 18,613 to missing)
(28,522 real changes made, 28,522 to missing)
(29,397 real changes made, 29,397 to missing)
(30,428 real changes made, 30,428 to missing)
(31,080 real changes made, 31,080 to missing)
(31,469 real changes made, 31,469 to missing)

. 
. foreach var of varlis *ukborn{
  2. 
.                 replace `var'=. if `var'<0
  3. 
. }
(37,417 real changes made, 37,417 to missing)
(8 real changes made, 8 to missing)
(26,181 real changes made, 26,181 to missing)
(27,159 real changes made, 27,159 to missing)
(29,414 real changes made, 29,414 to missing)
(30,110 real changes made, 30,110 to missing)
(30,516 real changes made, 30,516 to missing)
(33,740 real changes made, 33,740 to missing)
(8,887 real changes made, 8,887 to missing)

. 
. ** first, identify all those that are not born in UK, according to wave g
. 
. gen not_uk_born= g_ff_ukb==5

. 
. replace not_uk_born=0 if g_ff_ukb>0&g_ff_ukb<5
(0 real changes made)

. 
. ** then, add those in wave h 
. 
. replace not_uk=1 if g_ukborn==5
(357 real changes made)

. 
. replace not_uk=0 if g_ukborn<5
(0 real changes made)

. 
. replace not_uk=1 if h_ukborn==5
(304 real changes made)

. 
. replace not_uk=0 if h_ukborn<5
(1 real change made)

. 
. ** and now the citizens / naturalized
. 
. gen naturalized_dummy=not_uk

. 
. foreach var of varlist a_citzn1 b_citzn1 c_citzn1 d_citzn1 e_citzn1 f_citzn1{
  2. 
.                 replace naturalized_dummy=`var' if `var'==1
  3. 
. }
(136 real changes made)
(13 real changes made)
(10 real changes made)
(17 real changes made)
(6 real changes made)
(144 real changes made)

. 
. gen citizen=not_uk==0|naturalized==1

. 
. *** clean up the British identity variable
. 
. local i = 1

. 
. foreach var of varlist *_britid{
  2. 
.                 replace `var'=. if `var'<0|`var'>10
  3. 
.                 rename `var' britid`i'
  4. 
.                 local i= `i'+1
  5. }
(14,622 real changes made, 14,622 to missing)
(26,459 real changes made, 26,459 to missing)
(5,124 real changes made, 5,124 to missing)

. 
. egen british_id =rowmean(britid1 britid2 britid3)
(9167 missing values generated)

. 
. *** create the English identity variable(s)
. 
. local i=1

. 
. foreach var of  varlist *_natid1{
  2. 
.                 replace `var'=. if `var'<0
  3. 
.                 rename `var' english_`i'
  4. 
.                 local i=`i'+1
  5. 
. }
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)

. 
. 
. 
. gen english_recent=english_1
(18,499 missing values generated)

. 
. forvalues i=2 3 to 6{
  2. 
.                 replace english_recent=english_`i' if english_`i'!=.
  3.                 
. }
(1,409 real changes made)
(1,054 real changes made)
(965 real changes made)
(891 real changes made)
(3,360 real changes made)

. 
. 
. ****** now British 
. 
. local i=1

. 
. foreach var of  varlist *_natid5{
  2. 
.                 replace `var'=. if `var'<0
  3. 
.                 rename `var' british_`i'
  4. 
.                 local i=`i'+1
  5. 
. }
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)

. 
. gen british_recent=british_1
(18,499 missing values generated)

. 
. forvalues i=2 3 to 6{
  2. 
.                 replace british_recent=british_`i' if british_`i'!=.
  3. 
. }
(1,409 real changes made)
(1,052 real changes made)
(965 real changes made)
(891 real changes made)
(3,367 real changes made)

. 
. 
. 
. forvalues j=2 3 to 4{
  2. 
.                 local i=1
  3. 
.                 foreach var of  varlist *_natid`j'{
  4. 
. 
.                                 replace `var'=. if `var'<0
  5. 
.                                 rename `var' nat_`j'_`i'
  6. 
.                                 local i=`i'+1
  7. 
.                 }       
  8. 
. }
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)

. 
. 
. forvalues j=2 3 to 4{
  2. 
.                 gen nat_`j' = nat_`j'_1
  3. 
.                 forvalues i=2 3 to 6{
  4. 
.                                 replace nat_`j'=nat_`j'_`i' if nat_`j'_`i'!=. 
  5. 
.                 }
  6. 
. }
(18,499 missing values generated)
(1,409 real changes made)
(1,051 real changes made)
(965 real changes made)
(891 real changes made)
(3,359 real changes made)
(18,499 missing values generated)
(1,409 real changes made)
(1,051 real changes made)
(965 real changes made)
(891 real changes made)
(3,357 real changes made)
(18,499 missing values generated)
(1,409 real changes made)
(1,051 real changes made)
(965 real changes made)
(891 real changes made)
(3,356 real changes made)

. 
. 
. 
. rename british_recent british

. rename english_recent english

. 
. ****** also the other foreign
. 
. forvalues j=6 97 to 97{
  2. 
. local i=1
  3. 
.                 foreach var of  varlist *_natid`j'{
  4. 
. 
.                 replace `var'=. if `var'<0
  5. 
.                 rename `var' nat_`j'_`i'
  6. 
.                 local i=`i'+1
  7. 
.                 }       
  8. 
. }
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)
(862 real changes made, 862 to missing)
(27,357 real changes made, 27,357 to missing)
(28,488 real changes made, 28,488 to missing)
(29,591 real changes made, 29,591 to missing)
(30,285 real changes made, 30,285 to missing)
(30,756 real changes made, 30,756 to missing)

. 
. 
. forvalues j=6 97 to 97{
  2. 
.                 gen nat_`j' = nat_`j'_1
  3. 
.                 forvalues i=2 3 to 6{
  4. 
.                                 replace nat_`j'=nat_`j'_`i' if nat_`j'_`i'!=.
  5. 
. 
.                 }
  6. 
. }
(18,499 missing values generated)
(1,409 real changes made)
(1,051 real changes made)
(965 real changes made)
(891 real changes made)
(3,356 real changes made)
(18,499 missing values generated)
(1,409 real changes made)
(1,051 real changes made)
(965 real changes made)
(891 real changes made)
(3,357 real changes made)

. 
. 
. 
. 
. /* Now create the dummies: where "English" is English unless also British 
> 
> This procedure yields a fivefold typology: 
> (1) British only 
> (2) English only 
> (3) Welsh, Scottish, or (Northern) Irish only 
> (4) British and English
> (5) all other combinations
> */
. 
. *Count how many identities a person lists
. 
. egen total= rowtotal(english british nat_2 nat_3 nat_4 nat_6 nat_97)

. 
. *(1) British only 
. 
. gen british_only=total==1&british==1

. 
. replace british_only=. if british==.
(10,827 real changes made, 10,827 to missing)

. 
. *(2) English only, 
. 
. gen english_only=total==1&english==1

. 
. replace english_only=. if english==.
(10,827 real changes made, 10,827 to missing)

. 
. *(3)Welsh, Scottish, or (Northern) Irish only, 
. 
. gen wsni_only= total==1&(nat_2|nat_3|nat_4)

. 
. replace wsni_only=. if (nat_2==.&nat_3==.&nat_4==.)
(10,827 real changes made, 10,827 to missing)

. 
. *(4) British and English, 
. 
. gen british_and_english= total==2&(english==1)&(british==1)

. 
. replace british_and_english= . if(english==.|british==.)
(10,827 real changes made, 10,827 to missing)

. 
. ** and (5) all other combinations
. ** notice that in the original paper the one omitted is British only
. 
. gen all_other=!english_o&!wsni_o&!british_and&!british_o

. 
. ***** Clean the demographics
. 
. replace h_dvage=. if h_dvage<18
(1,195 real changes made, 1,195 to missing)

. 
. gen sex=h_sex==2

. 
. replace sex=. if h_sex==.
(0 real changes made)

. 
. gen marital_status= h_marstat_dv

. 
. replace marital_status=. if marital_status<0 
(90 real changes made, 90 to missing)

. 
. recode marital_status  1=2 3=5 4=5 6=1
(marital_status: 34625 changes made)

. 
. label define marital 1 "single" 2 "couple" 5 "divorced/widowed"

.  
. label values marital_status marital

. 
. gen children= h_nchild_dv

. 
. recode children 2=1 
(children: 4266 changes made)

. 
. replace children=3 if children>=3 &children!=.
(415 real changes made)

. 
. label define chd 0 "0" 1 "1-2" 3 "3+" 

.  
. label values children chd

. 
. gen race = h_racel

. 
. recode race -9=. 2=1 3=1 4=1 6=5 7=5 8=5 10=9 11=9 12=9 13=9 15=14 16=14 17=5 97=5
(race: 7402 changes made)

. 
. label define race 1 "White" 5 "Other" 9 "Asian" 14 "Black" 

.  
. label values race race

.  
. ** social status and income
. /*
> Social class with the sixfold version of National Statistics Socio-Economic Classification 
> (NS-SEC).Note: This is a coarsening of  h_jbnssec8_dv
> */
. 
. gen class=h_jbnssec8_dv

. 
. gen class2=h_jbnssec8_dv

. 
. replace class=. if class<0
(17,293 real changes made, 17,293 to missing)

. 
. replace class2=. if class2<=0
(17,293 real changes made, 17,293 to missing)

. 
. recode class 1=2 7=8 
(class: 4856 changes made)

. 
. recode class2 1=2 7=8 
(class2: 4856 changes made)

. 
. 
. 
.  
. save "./ChanBrexitReplication/almostthere.dta", replace
file ./ChanBrexitReplication/almostthere.dta saved

. 
. 
. keep pidp h_hidp b_arts2a1- b_arts2freq b_mla e_arts2a1- e_arts2freq e_mla h_dvage

.  
. foreach var of varlist b_arts2a1-e_mla{
  2.  
.                 replace `var'=. if `var'<0 
  3.  
.                 label values `var' .
  4.  
.                 replace `var'=`var'+1
  5.  
. }
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,331 real changes made, 1,331 to missing)
(27,437 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(7,867 real changes made, 7,867 to missing)
(20,901 real changes made)
(1,332 real changes made, 1,332 to missing)
(27,436 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,164 real changes made, 2,164 to missing)
(29,014 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(2,165 real changes made, 2,165 to missing)
(29,013 real changes made)
(9,306 real changes made, 9,306 to missing)
(21,872 real changes made)
(2,161 real changes made, 2,161 to missing)
(29,017 real changes made)

.  
. foreach num in a1 a2 a3 a4 a5 a6 a7 a96 b9 b10 b11 b12 b13 b14 b15 b96{
  2.  
.                 replace e_arts2`num'=b_arts2`num' if e_arts2`num'==.
  3.  
. }
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,102 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)
(2,103 real changes made)

.  
. replace e_mla=b_mla if e_mla==.
(2,099 real changes made)

.  
. keep pidp h_hidp e_* h_dv

.  
. ** The following exports the data that can be used to re-estimate the LCA from scratch 
.  
. saveold "./ChanBrexitReplication/forlatentclass.dta", replace version(12)
(saving in Stata 12 format, which can be read by Stata 11 or 12)
file ./ChanBrexitReplication/forlatentclass.dta saved

.   
. /* This Stata do file uses the LCA results included with the replication file. 
> In case you want to recreate from scratch the categories, you need to run the R script 
> LCA_estimation_Replication.R
> Please ensure that the numerical labels in the LCA data exported from R are structured so that
> 1 corresponds to "omnivore", 2 to "paucivore", and 3 to "univore".
>  */
.  
. use "./ChanBrexitReplication/almostthere.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

.  
. ***Now add the NUTS identifiers
. 
. cap drop _me

. 
. rename h_hidp hidp

. 
. merge m:1 hidp using "./ChanBrexitReplication/ukhls.nuts.dta"
(note: variable hidp was long, now double to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                         4,533
        from master                        15  (_merge==1)
        from using                      4,518  (_merge==2)

    matched                            39,278  (_merge==3)
    -----------------------------------------

. 
. *Merge the China shock
. 
. cap drop _me

. 
. replace NUTS_code="UKJ13" if NUTS_code=="UKJ12"
(260 real changes made)

. 
. merge m:1 NUTS_code using "./ChanBrexitReplication/ChinaShock.dta"
(note: variable NUTS_code was str5, now str8 to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                         2,841
        from master                     2,835  (_merge==1)
        from using                          6  (_merge==2)

    matched                            40,976  (_merge==3)
    -----------------------------------------

. 
. encode NUTS1, gen(NC1)

. 
. cap drop _me

. 
. drop if pidp==.
(4,524 observations deleted)

. 
. merge 1:1 pidp using "./ChanBrexitReplication/LCA.dta"
(note: variable e_arts2b10 was byte, now long to accommodate using data's values)
(note: variable e_arts2b11 was byte, now long to accommodate using data's values)
(note: variable e_arts2b12 was byte, now long to accommodate using data's values)
(note: variable e_arts2a2 was byte, now long to accommodate using data's values)
(note: variable e_arts2a3 was byte, now long to accommodate using data's values)
(note: variable e_arts2a5 was byte, now long to accommodate using data's values)
(note: variable e_arts2a6 was byte, now long to accommodate using data's values)
(note: variable e_mla3 was byte, now long to accommodate using data's values)
(note: variable e_arts2a1 was byte, now long to accommodate using data's values)
(note: variable e_arts2a4 was byte, now long to accommodate using data's values)
(note: variable e_arts2a7 was byte, now long to accommodate using data's values)
(note: variable e_arts2a96 was byte, now long to accommodate using data's values)
(note: variable e_arts2b9 was byte, now long to accommodate using data's values)
(note: variable e_arts2b13 was byte, now long to accommodate using data's values)
(note: variable e_arts2b14 was byte, now long to accommodate using data's values)
(note: variable e_arts2b15 was byte, now long to accommodate using data's values)
(note: variable e_arts2b96 was byte, now long to accommodate using data's values)
(note: variable e_arts2freq was byte, now long to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                            39,293  (_merge==3)
    -----------------------------------------

. 
. replace class=0 if class==.
(17,293 real changes made)

. 
. cap drop _me

. 
. merge m:1 h_hidp using "./ChanBrexitReplication/poverty_dummy.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                           616
        from master                       511  (_merge==1)
        from using                        105  (_merge==2)

    matched                            38,782  (_merge==3)
    -----------------------------------------

. 
. label define culturalconsumption 1 "omnivore" 2 "paucivore" 3 "univore"

. 
. label values latentclass culturalconsumption

. 
. gen agesq =h_dvage^2
(1,300 missing values generated)

. 
. replace h_qfhigh_dv=. if h_qfhigh_dv<0
(5,739 real changes made, 5,739 to missing)

. 
. save  "./ChanBrexitReplication/ReconstructedReplicationData/FullReplicationData.dta", replace
file ./ChanBrexitReplication/ReconstructedReplicationData/FullReplicationData.dta saved

. 
. use  "./ChanBrexitReplication/ReconstructedReplicationData/FullReplicationData.dta", replace
(Substantive data for responding adults (16+), incl. proxies)

. 
. keep if age_at>=19
(1,700 observations deleted)

. 
. encode NUTS1, gen(NC)

. 
. cap drop consumption*

. 
. tab latent, gen(consumption)

latentclass |      Freq.     Percent        Cum.
------------+-----------------------------------
   omnivore |      1,966        6.33        6.33
  paucivore |      9,701       31.26       37.59
    univore |     19,371       62.41      100.00
------------+-----------------------------------
      Total |     31,038      100.00

. 
. *** Regression of Leave vote, with the identity and cultural consumption variables (column 4 table 1)
. *** to identify the estimation sample of the long regression. 
. 
. ** NOTA PAOLO: questo viene stimato una prima volta, ma non scritto in tabella per ora
. 
. logit leave import british_and all_ot english_only wsni_only british_id poor  i.class consumption1 consum
> ption2  i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h_qfhigh_dv [pweight= h_indinui_xw] if
>  citizen==1, cluster(NUTS_c)

Iteration 0:   log pseudolikelihood = -15387.818  
Iteration 1:   log pseudolikelihood = -13316.974  
Iteration 2:   log pseudolikelihood = -13301.998  
Iteration 3:   log pseudolikelihood = -13301.958  
Iteration 4:   log pseudolikelihood = -13301.958  

Logistic regression                             Number of obs     =     18,909
                                                Wald chi2(51)     =    2336.04
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -13301.958               Pseudo R2         =     0.1356

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
                    leave |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
             import_shock |    .380231   .2099765     1.81   0.070    -.0313153    .7917773
      british_and_english |   .2333516   .0634896     3.68   0.000     .1089142    .3577889
                all_other |  -.1373257   .0842807    -1.63   0.103    -.3025129    .0278615
             english_only |   .4419947   .0546343     8.09   0.000     .3349135    .5490759
                wsni_only |   .0026663    .103168     0.03   0.979    -.1995392    .2048718
               british_id |   .1075784   .0088756    12.12   0.000     .0901825    .1249744
                     poor |   .0127068   .0587024     0.22   0.829    -.1023477    .1277614
                          |
                    class |
                       2  |  -.6331866   .0812856    -7.79   0.000    -.7925034   -.4738699
                       3  |  -.4110283   .0635172    -6.47   0.000    -.5355197    -.286537
                       4  |  -.1585709   .0748352    -2.12   0.034    -.3052452   -.0118967
                       5  |   .0685424    .073033     0.94   0.348    -.0745995    .2116844
                       6  |   .0100757   .1070571     0.09   0.925    -.1997524    .2199039
                       8  |  -.0421144    .067575    -0.62   0.533    -.1745589    .0903302
                          |
             consumption1 |  -1.074135   .0813113   -13.21   0.000    -1.233502   -.9147679
             consumption2 |  -.3984905   .0400887    -9.94   0.000    -.4770629   -.3199181
                          |
                       NC |
                     UKD  |  -.0386341   .0935328    -0.41   0.680     -.221955    .1446868
                     UKE  |   .2118884   .1210887     1.75   0.080     -.025441    .4492178
                     UKF  |   .0937759   .1238578     0.76   0.449    -.1489809    .3365326
                     UKG  |   .0824149    .087071     0.95   0.344    -.0882412     .253071
                     UKH  |   .1159997   .0839132     1.38   0.167    -.0484673    .2804666
                     UKI  |   .0627062   .1380325     0.45   0.650    -.2078325    .3332449
                     UKJ  |  -.0021421    .089658    -0.02   0.981    -.1778687    .1735844
                     UKK  |   .0953401   .0964624     0.99   0.323    -.0937227    .2844028
                     UKL  |  -.0826738   .1127617    -0.73   0.463    -.3036827     .138335
                     UKM  |  -.4545801   .1347526    -3.37   0.001    -.7186903   -.1904698
                          |
                     race |
                   Other  |  -.5967027   .1714565    -3.48   0.001    -.9327512   -.2606541
                   Asian  |  -.3296697   .1129495    -2.92   0.004    -.5510466   -.1082929
                   Black  |  -.5705626   .1310855    -4.35   0.000    -.8274854   -.3136398
                          |
                 children |
                     1-2  |   .0999817   .0598349     1.67   0.095    -.0172926    .2172561
                      3+  |   .3248204   .1169183     2.78   0.005     .0956646    .5539761
                          |
           marital_status |
                  couple  |  -.0149052   .0669618    -0.22   0.824    -.1461479    .1163376
        divorced/widowed  |   .0301762   .0849138     0.36   0.722    -.1362518    .1966042
                          |
                    h_sex |
                  female  |   -.227477   .0337372    -6.74   0.000    -.2936007   -.1613534
                  h_dvage |   .0571257   .0073637     7.76   0.000      .042693    .0715584
                    agesq |  -.0004849   .0000684    -7.09   0.000    -.0006191   -.0003508
                          |
              h_qfhigh_dv |
1st degree or equivalent  |    .176223   .0622984     2.83   0.005     .0541203    .2983257
           Diploma in he  |   .8980656   .0895832    10.02   0.000     .7224857    1.073645
  Teaching qual not pgce  |   .4920917   .1235014     3.98   0.000     .2500335      .73415
  Nursing/other med qual  |   .7206789   .1311504     5.50   0.000     .4636288    .9777289
     Other higher degree  |   .3690039   .6559506     0.56   0.574    -.9166357    1.654643
                 A level  |   .5088271    .083967     6.06   0.000     .3442549    .6733994
     Welsh baccalaureate  |   2.482415   .9495169     2.61   0.009     .6213961    4.343434
 I'nationl baccalaureate  |   .8553869   .8256752     1.04   0.300    -.7629068    2.473681
                AS level  |   .6335466   .1679979     3.77   0.000     .3042767    .9628165
          Highers (scot)  |   .7049119   .2049517     3.44   0.001      .303214     1.10661
   Cert 6th year studies  |    .772583   .3112505     2.48   0.013     .1625432    1.382623
            GCSE/O level  |   .9742128   .0702104    13.88   0.000     .8366029    1.111823
                     CSE  |   1.181889   .1122032    10.53   0.000     .9619746    1.401803
        Standard/o/lower  |   1.226553   .1681697     7.29   0.000     .8969464     1.55616
       Other school cert  |   .7046852   .1312008     5.37   0.000     .4475364    .9618339
       None of the above  |   1.118066   .0845734    13.22   0.000     .9523048    1.283827
                          |
                    _cons |  -3.041397   .2118441   -14.36   0.000    -3.456604    -2.62619
-------------------------------------------------------------------------------------------

. 
. cap drop in_broken

. 
. gen in_broken=e(sample)

. 
. *** Baseline: as in column 3 of Table 1 and column 1 of Table A.3, keeping the sample constant
. 
. logit leave import  poor  i.class   i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h_qfhigh_d
> v [pweight= h_indinui_xw] if in_broken, cluster(NUTS_c)

Iteration 0:   log pseudolikelihood = -15387.818  
Iteration 1:   log pseudolikelihood = -13795.386  
Iteration 2:   log pseudolikelihood =  -13788.55  
Iteration 3:   log pseudolikelihood = -13788.548  
Iteration 4:   log pseudolikelihood = -13788.548  

Logistic regression                             Number of obs     =     18,909
                                                Wald chi2(44)     =    1673.70
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -13788.548               Pseudo R2         =     0.1039

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
                    leave |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
             import_shock |   .4449737   .2101118     2.12   0.034     .0331622    .8567852
                     poor |   .0331772   .0577171     0.57   0.565    -.0799461    .1463006
                          |
                    class |
                       2  |  -.6172913   .0822245    -7.51   0.000    -.7784484   -.4561343
                       3  |  -.4049659   .0632502    -6.40   0.000    -.5289339   -.2809978
                       4  |  -.1337318   .0768761    -1.74   0.082    -.2844063    .0169426
                       5  |   .0320029   .0685881     0.47   0.641    -.1024272    .1664331
                       6  |   .1250328   .1052617     1.19   0.235    -.0812764     .331342
                       8  |  -.0156517   .0672664    -0.23   0.816    -.1474914    .1161879
                          |
                       NC |
                     UKD  |  -.0916203    .091523    -1.00   0.317     -.271002    .0877614
                     UKE  |   .1919503   .1292878     1.48   0.138    -.0614492    .4453498
                     UKF  |   .0534062   .1198259     0.45   0.656    -.1814483    .2882607
                     UKG  |   .0788092   .0870348     0.91   0.365    -.0917759    .2493944
                     UKH  |    .087922   .0801032     1.10   0.272    -.0690773    .2449213
                     UKI  |   -.066021   .1338981    -0.49   0.622    -.3284564    .1964144
                     UKJ  |  -.0762172   .0884621    -0.86   0.389    -.2495996    .0971653
                     UKK  |   .0213001   .0906893     0.23   0.814    -.1564476    .1990478
                     UKL  |  -.3174664   .1053018    -3.01   0.003    -.5238542   -.1110786
                     UKM  |  -.8478362    .114195    -7.42   0.000    -1.071654   -.6240181
                          |
                     race |
                   Other  |  -.7883123   .1690178    -4.66   0.000    -1.119581   -.4570435
                   Asian  |  -.4154169   .1110861    -3.74   0.000    -.6331417   -.1976921
                   Black  |  -.7029114   .1332177    -5.28   0.000    -.9640133   -.4418094
                          |
                 children |
                     1-2  |    .132424   .0575607     2.30   0.021     .0196072    .2452408
                      3+  |   .3829148    .117786     3.25   0.001     .1520585    .6137712
                          |
           marital_status |
                  couple  |   .0236009   .0678281     0.35   0.728    -.1093397    .1565416
        divorced/widowed  |   .0658255   .0861139     0.76   0.445    -.1029548    .2346057
                          |
                    h_sex |
                  female  |  -.2332004   .0341224    -6.83   0.000    -.3000791   -.1663217
                  h_dvage |   .0461217   .0068195     6.76   0.000     .0327557    .0594876
                    agesq |  -.0003519   .0000636    -5.53   0.000    -.0004766   -.0002273
                          |
              h_qfhigh_dv |
1st degree or equivalent  |   .2551957   .0635081     4.02   0.000     .1307221    .3796693
           Diploma in he  |   1.128155   .0909446    12.40   0.000     .9499073    1.306403
  Teaching qual not pgce  |   .6492158   .1196293     5.43   0.000     .4147467    .8836848
  Nursing/other med qual  |   .9368089   .1329833     7.04   0.000     .6761664    1.197451
     Other higher degree  |    .589177   .7039909     0.84   0.403    -.7906198    1.968974
                 A level  |   .7333893   .0848853     8.64   0.000     .5670172    .8997614
     Welsh baccalaureate  |    2.59294   .8523674     3.04   0.002     .9223304    4.263549
 I'nationl baccalaureate  |   .8419422   .7576128     1.11   0.266    -.6429515    2.326836
                AS level  |   .8922793   .1664036     5.36   0.000     .5661341    1.218424
          Highers (scot)  |    .885361   .2047666     4.32   0.000     .4840259    1.286696
   Cert 6th year studies  |   1.068002    .300892     3.55   0.000     .4782643    1.657739
            GCSE/O level  |   1.340502   .0717463    18.68   0.000     1.199882    1.481122
                     CSE  |   1.604774   .1146193    14.00   0.000     1.380125    1.829424
        Standard/o/lower  |   1.486584   .1656159     8.98   0.000     1.161983    1.811186
       Other school cert  |   1.025741    .136409     7.52   0.000     .7583838    1.293097
       None of the above  |   1.549457   .0851919    18.19   0.000     1.382484     1.71643
                          |
                    _cons |  -2.318024   .1997723   -11.60   0.000     -2.70957   -1.926478
-------------------------------------------------------------------------------------------

. 
. *** Long regression: as in column 4 of Table 1 and column 2 of Table A.3
. 
. logit leave import british_and all_ot english_only wsni_only british_id poor  i.class consumption1 consum
> ption2  i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h_qfhigh_dv [pweight= h_indinui_xw] if
>  citizen==1, cluster(NUTS_c)

Iteration 0:   log pseudolikelihood = -15387.818  
Iteration 1:   log pseudolikelihood = -13316.974  
Iteration 2:   log pseudolikelihood = -13301.998  
Iteration 3:   log pseudolikelihood = -13301.958  
Iteration 4:   log pseudolikelihood = -13301.958  

Logistic regression                             Number of obs     =     18,909
                                                Wald chi2(51)     =    2336.04
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -13301.958               Pseudo R2         =     0.1356

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
                    leave |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
             import_shock |    .380231   .2099765     1.81   0.070    -.0313153    .7917773
      british_and_english |   .2333516   .0634896     3.68   0.000     .1089142    .3577889
                all_other |  -.1373257   .0842807    -1.63   0.103    -.3025129    .0278615
             english_only |   .4419947   .0546343     8.09   0.000     .3349135    .5490759
                wsni_only |   .0026663    .103168     0.03   0.979    -.1995392    .2048718
               british_id |   .1075784   .0088756    12.12   0.000     .0901825    .1249744
                     poor |   .0127068   .0587024     0.22   0.829    -.1023477    .1277614
                          |
                    class |
                       2  |  -.6331866   .0812856    -7.79   0.000    -.7925034   -.4738699
                       3  |  -.4110283   .0635172    -6.47   0.000    -.5355197    -.286537
                       4  |  -.1585709   .0748352    -2.12   0.034    -.3052452   -.0118967
                       5  |   .0685424    .073033     0.94   0.348    -.0745995    .2116844
                       6  |   .0100757   .1070571     0.09   0.925    -.1997524    .2199039
                       8  |  -.0421144    .067575    -0.62   0.533    -.1745589    .0903302
                          |
             consumption1 |  -1.074135   .0813113   -13.21   0.000    -1.233502   -.9147679
             consumption2 |  -.3984905   .0400887    -9.94   0.000    -.4770629   -.3199181
                          |
                       NC |
                     UKD  |  -.0386341   .0935328    -0.41   0.680     -.221955    .1446868
                     UKE  |   .2118884   .1210887     1.75   0.080     -.025441    .4492178
                     UKF  |   .0937759   .1238578     0.76   0.449    -.1489809    .3365326
                     UKG  |   .0824149    .087071     0.95   0.344    -.0882412     .253071
                     UKH  |   .1159997   .0839132     1.38   0.167    -.0484673    .2804666
                     UKI  |   .0627062   .1380325     0.45   0.650    -.2078325    .3332449
                     UKJ  |  -.0021421    .089658    -0.02   0.981    -.1778687    .1735844
                     UKK  |   .0953401   .0964624     0.99   0.323    -.0937227    .2844028
                     UKL  |  -.0826738   .1127617    -0.73   0.463    -.3036827     .138335
                     UKM  |  -.4545801   .1347526    -3.37   0.001    -.7186903   -.1904698
                          |
                     race |
                   Other  |  -.5967027   .1714565    -3.48   0.001    -.9327512   -.2606541
                   Asian  |  -.3296697   .1129495    -2.92   0.004    -.5510466   -.1082929
                   Black  |  -.5705626   .1310855    -4.35   0.000    -.8274854   -.3136398
                          |
                 children |
                     1-2  |   .0999817   .0598349     1.67   0.095    -.0172926    .2172561
                      3+  |   .3248204   .1169183     2.78   0.005     .0956646    .5539761
                          |
           marital_status |
                  couple  |  -.0149052   .0669618    -0.22   0.824    -.1461479    .1163376
        divorced/widowed  |   .0301762   .0849138     0.36   0.722    -.1362518    .1966042
                          |
                    h_sex |
                  female  |   -.227477   .0337372    -6.74   0.000    -.2936007   -.1613534
                  h_dvage |   .0571257   .0073637     7.76   0.000      .042693    .0715584
                    agesq |  -.0004849   .0000684    -7.09   0.000    -.0006191   -.0003508
                          |
              h_qfhigh_dv |
1st degree or equivalent  |    .176223   .0622984     2.83   0.005     .0541203    .2983257
           Diploma in he  |   .8980656   .0895832    10.02   0.000     .7224857    1.073645
  Teaching qual not pgce  |   .4920917   .1235014     3.98   0.000     .2500335      .73415
  Nursing/other med qual  |   .7206789   .1311504     5.50   0.000     .4636288    .9777289
     Other higher degree  |   .3690039   .6559506     0.56   0.574    -.9166357    1.654643
                 A level  |   .5088271    .083967     6.06   0.000     .3442549    .6733994
     Welsh baccalaureate  |   2.482415   .9495169     2.61   0.009     .6213961    4.343434
 I'nationl baccalaureate  |   .8553869   .8256752     1.04   0.300    -.7629068    2.473681
                AS level  |   .6335466   .1679979     3.77   0.000     .3042767    .9628165
          Highers (scot)  |   .7049119   .2049517     3.44   0.001      .303214     1.10661
   Cert 6th year studies  |    .772583   .3112505     2.48   0.013     .1625432    1.382623
            GCSE/O level  |   .9742128   .0702104    13.88   0.000     .8366029    1.111823
                     CSE  |   1.181889   .1122032    10.53   0.000     .9619746    1.401803
        Standard/o/lower  |   1.226553   .1681697     7.29   0.000     .8969464     1.55616
       Other school cert  |   .7046852   .1312008     5.37   0.000     .4475364    .9618339
       None of the above  |   1.118066   .0845734    13.22   0.000     .9523048    1.283827
                          |
                    _cons |  -3.041397   .2118441   -14.36   0.000    -3.456604    -2.62619
-------------------------------------------------------------------------------------------

. 
. 
. *** The two columns (2-3) of Table 2, and also columns 5-6 of Table A.3
. 
. logit consumption1   import i.class  poor  i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h_q
> fhigh_dv [pweight= h_indinui_xw] if in_broken , cluster(NUTS_c)

note: 8.h_qfhigh_dv != 0 predicts failure perfectly
      8.h_qfhigh_dv dropped and 7 obs not used

Iteration 0:   log pseudolikelihood = -5834.3732  
Iteration 1:   log pseudolikelihood = -5217.3477  
Iteration 2:   log pseudolikelihood = -5005.3948  
Iteration 3:   log pseudolikelihood = -5000.5394  
Iteration 4:   log pseudolikelihood =   -5000.53  
Iteration 5:   log pseudolikelihood =   -5000.53  

Logistic regression                             Number of obs     =     18,902
                                                Wald chi2(43)     =     969.60
                                                Prob > chi2       =     0.0000
Log pseudolikelihood =   -5000.53               Pseudo R2         =     0.1429

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
             consumption1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
             import_shock |  -.8662032   .3764659    -2.30   0.021    -1.604063   -.1283437
                          |
                    class |
                       2  |  -.0147289   .1666264    -0.09   0.930    -.3413105    .3118528
                       3  |   .1450115    .127649     1.14   0.256     -.105176     .395199
                       4  |  -.1242545   .1651078    -0.75   0.452    -.4478598    .1993509
                       5  |    .228364   .1534099     1.49   0.137    -.0723138    .5290418
                       6  |  -.4248801   .2667214    -1.59   0.111    -.9476444    .0978841
                       8  |  -.2545776   .1534241    -1.66   0.097    -.5552834    .0461282
                          |
                     poor |  -.1577984   .1348528    -1.17   0.242    -.4221049    .1065082
                          |
                       NC |
                     UKD  |   .4055544   .2330379     1.74   0.082    -.0511916    .8623003
                     UKE  |   .2894092   .2323762     1.25   0.213    -.1660398    .7448582
                     UKF  |   .4537495    .245726     1.85   0.065    -.0278646    .9353637
                     UKG  |  -.0703447   .2339098    -0.30   0.764    -.5287995    .3881101
                     UKH  |   -.024492   .2061334    -0.12   0.905    -.4285059     .379522
                     UKI  |   .8835396   .2446698     3.61   0.000     .4039956    1.363084
                     UKJ  |   .3779915   .2115101     1.79   0.074    -.0365606    .7925437
                     UKK  |   .5523592   .2089975     2.64   0.008     .1427316    .9619868
                     UKL  |  -.0680983   .3570811    -0.19   0.849    -.7679643    .6317678
                     UKM  |   .3040763   .2995202     1.02   0.310    -.2829726    .8911252
                          |
                     race |
                   Other  |  -.0431926   .2396051    -0.18   0.857    -.5128099    .4264248
                   Asian  |  -1.178211   .1894198    -6.22   0.000    -1.549467   -.8069548
                   Black  |  -1.126922   .2133772    -5.28   0.000    -1.545134   -.7087107
                          |
                 children |
                     1-2  |  -.6460535   .0974369    -6.63   0.000    -.8370262   -.4550807
                      3+  |  -1.239402   .3288782    -3.77   0.000    -1.883991   -.5948127
                          |
           marital_status |
                  couple  |  -.1061373   .1079586    -0.98   0.326    -.3177323    .1054576
        divorced/widowed  |   .0588998   .1325393     0.44   0.657    -.2008723     .318672
                          |
                    h_sex |
                  female  |  -.0491797   .0673892    -0.73   0.466    -.1812601    .0829006
                  h_dvage |    .086286   .0139885     6.17   0.000      .058869    .1137029
                    agesq |   -.000824   .0001374    -6.00   0.000    -.0010933   -.0005547
                          |
              h_qfhigh_dv |
1st degree or equivalent  |  -.1704511   .0970093    -1.76   0.079    -.3605858    .0196835
           Diploma in he  |  -1.163318    .171111    -6.80   0.000     -1.49869   -.8279469
  Teaching qual not pgce  |  -.6463488   .2168224    -2.98   0.003    -1.071313   -.2213847
  Nursing/other med qual  |  -.8881273    .215308    -4.12   0.000    -1.310123   -.4661314
     Other higher degree  |  -.2711318   .8053481    -0.34   0.736    -1.849585    1.307321
                 A level  |  -.8875604   .1281004    -6.93   0.000    -1.138632   -.6364883
     Welsh baccalaureate  |          0  (empty)
 I'nationl baccalaureate  |  -1.476813   1.046712    -1.41   0.158    -3.528331    .5747048
                AS level  |  -.8950572    .460935    -1.94   0.052    -1.798473    .0083587
          Highers (scot)  |  -.4041625   .2671625    -1.51   0.130    -.9277913    .1194663
   Cert 6th year studies  |    -1.7815   .7502856    -2.37   0.018    -3.252033   -.3109672
            GCSE/O level  |  -1.751186    .125375   -13.97   0.000    -1.996916   -1.505455
                     CSE  |  -2.929888   .3309716    -8.85   0.000    -3.578581   -2.281196
        Standard/o/lower  |  -1.563253   .3814277    -4.10   0.000    -2.310838   -.8156689
       Other school cert  |  -2.398163   .4073208    -5.89   0.000    -3.196497   -1.599829
       None of the above  |  -2.840269   .2088154   -13.60   0.000    -3.249539   -2.430998
                          |
                    _cons |  -3.400144   .4012852    -8.47   0.000    -4.186649    -2.61364
-------------------------------------------------------------------------------------------

. 
. logit consumption2    import  i.class poor   i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h
> _qfhigh_dv [pweight= h_indinui_xw] if in_broken , cluster(NUTS_c)

Iteration 0:   log pseudolikelihood = -14188.013  
Iteration 1:   log pseudolikelihood = -13119.159  
Iteration 2:   log pseudolikelihood = -13094.964  
Iteration 3:   log pseudolikelihood = -13094.952  
Iteration 4:   log pseudolikelihood = -13094.952  

Logistic regression                             Number of obs     =     18,909
                                                Wald chi2(44)     =    2427.56
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -13094.952               Pseudo R2         =     0.0770

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
             consumption2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
             import_shock |  -.2519048   .1812362    -1.39   0.165    -.6071213    .1033117
                          |
                    class |
                       2  |   .2800824   .0808365     3.46   0.001     .1216458     .438519
                       3  |    .151998   .0593757     2.56   0.010     .0356237    .2683724
                       4  |   .0640994   .0858418     0.75   0.455    -.1041474    .2323462
                       5  |   .1272727   .0863936     1.47   0.141    -.0420556     .296601
                       6  |   -.165957   .1211837    -1.37   0.171    -.4034726    .0715586
                       8  |   -.189859    .064979    -2.92   0.003    -.3172156   -.0625024
                          |
                     poor |  -.3031991   .0621761    -4.88   0.000    -.4250619   -.1813362
                          |
                       NC |
                     UKD  |  -.0635316    .158512    -0.40   0.689    -.3742095    .2471463
                     UKE  |  -.0724542   .1575209    -0.46   0.646    -.3811896    .2362812
                     UKF  |  -.0096471   .1665825    -0.06   0.954    -.3361429    .3168486
                     UKG  |   .0099102   .1540235     0.06   0.949    -.2919703    .3117907
                     UKH  |    .080304   .1696777     0.47   0.636    -.2522581    .4128662
                     UKI  |   .0835003   .1717829     0.49   0.627     -.253188    .4201885
                     UKJ  |   .1084753   .1474976     0.74   0.462    -.1806148    .3975653
                     UKK  |    .107406    .155946     0.69   0.491    -.1982426    .4130546
                     UKL  |  -.1502985   .1630696    -0.92   0.357    -.4699089     .169312
                     UKM  |   .1646086   .1617074     1.02   0.309     -.152332    .4815492
                          |
                     race |
                   Other  |  -.0275637   .1496476    -0.18   0.854    -.3208675    .2657401
                   Asian  |  -.6320684   .0881799    -7.17   0.000    -.8048979   -.4592389
                   Black  |   -.542472   .1308856    -4.14   0.000    -.7990031   -.2859408
                          |
                 children |
                     1-2  |  -.1283637   .0543641    -2.36   0.018    -.2349153   -.0218121
                      3+  |  -.4352625   .1220297    -3.57   0.000    -.6744363   -.1960888
                          |
           marital_status |
                  couple  |    .091954   .0696653     1.32   0.187    -.0445875    .2284955
        divorced/widowed  |  -.1555173   .0782771    -1.99   0.047    -.3089376    -.002097
                          |
                    h_sex |
                  female  |    .173499   .0435323     3.99   0.000     .0881772    .2588208
                  h_dvage |   .0211002   .0073588     2.87   0.004     .0066772    .0355233
                    agesq |  -.0000879   .0000671    -1.31   0.191    -.0002195    .0000437
                          |
              h_qfhigh_dv |
1st degree or equivalent  |  -.0670358   .0693351    -0.97   0.334    -.2029301    .0688584
           Diploma in he  |  -.4084615   .0873872    -4.67   0.000    -.5797371   -.2371858
  Teaching qual not pgce  |  -.2267222   .1321943    -1.72   0.086    -.4858183    .0323739
  Nursing/other med qual  |   -.564058   .1156119    -4.88   0.000    -.7906532   -.3374627
     Other higher degree  |  -.0054587   .5722287    -0.01   0.992    -1.127006    1.116089
                 A level  |   -.248665   .0752795    -3.30   0.001    -.3962101     -.10112
     Welsh baccalaureate  |  -1.166206   .8448328    -1.38   0.167    -2.822048     .489636
 I'nationl baccalaureate  |   .3493823   .6987119     0.50   0.617    -1.020068    1.718832
                AS level  |  -.4120322   .2068688    -1.99   0.046    -.8174875   -.0065769
          Highers (scot)  |  -.6068832   .1656936    -3.66   0.000    -.9316367   -.2821297
   Cert 6th year studies  |  -.3489391   .3419377    -1.02   0.308    -1.019125    .3212465
            GCSE/O level  |  -.8424304   .0670295   -12.57   0.000    -.9738057    -.711055
                     CSE  |  -1.315017   .1221066   -10.77   0.000    -1.554342   -1.075693
        Standard/o/lower  |  -1.167232   .1650148    -7.07   0.000    -1.490655   -.8438088
       Other school cert  |  -1.020987   .1286282    -7.94   0.000    -1.273094   -.7688805
       None of the above  |   -1.71491   .0790161   -21.70   0.000    -1.869779   -1.560041
                          |
                    _cons |  -.8857394   .2510339    -3.53   0.000    -1.377757    -.393722
-------------------------------------------------------------------------------------------

. 
. *** Supplementary evidence: Columns 3-4 of Table A.3 
. *** The effect of import shock on cultural consumption with 
. *** multinomial logit (instead of the separate binary logits)
. 
. mlogit latent  import  poor  i.class i.NC i.race i.children i.marital_s i.h_sex h_dvage agesq i.h_qfhigh_
> dv [pweight= h_indinui_xw] if in_broken , cluster(NUTS_c)

Iteration 0:   log pseudolikelihood = -19327.234  
Iteration 1:   log pseudolikelihood = -17108.414  
Iteration 2:   log pseudolikelihood = -16930.161  
Iteration 3:   log pseudolikelihood = -16926.019  
Iteration 4:   log pseudolikelihood = -16925.994  
Iteration 5:   log pseudolikelihood = -16925.988  
Iteration 6:   log pseudolikelihood = -16925.987  
Iteration 7:   log pseudolikelihood = -16925.987  
Iteration 8:   log pseudolikelihood = -16925.987  

Multinomial logistic regression                 Number of obs     =     18,909
                                                Wald chi2(88)     =    6863.53
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -16925.987               Pseudo R2         =     0.1242

                                         (Std. Err. adjusted for 166 clusters in NUTS_code)
-------------------------------------------------------------------------------------------
                          |               Robust
              latentclass |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
--------------------------+----------------------------------------------------------------
omnivore                  |
             import_shock |  -1.070576   .4025001    -2.66   0.008    -1.859462   -.2816906
                     poor |  -.2881944   .1431532    -2.01   0.044    -.5687695   -.0076192
                          |
                    class |
                       2  |   .1649215   .1715142     0.96   0.336      -.17124    .5010831
                       3  |   .2532535   .1335258     1.90   0.058    -.0084524    .5149593
                       4  |   -.101619   .1737668    -0.58   0.559    -.4421956    .2389576
                       5  |   .3251499   .1677457     1.94   0.053    -.0036257    .6539255
                       6  |  -.4878789   .2749279    -1.77   0.076    -1.026728    .0509699
                       8  |  -.3201864   .1588941    -2.02   0.044     -.631613   -.0087598
                          |
                       NC |
                     UKD  |   .4043014   .2837121     1.43   0.154     -.151764    .9603669
                     UKE  |    .278672   .3009202     0.93   0.354    -.3111208    .8684648
                     UKF  |   .4922751   .3110131     1.58   0.113    -.1172995     1.10185
                     UKG  |  -.0605427   .2911834    -0.21   0.835    -.6312517    .5101662
                     UKH  |   .0195434   .2719201     0.07   0.943    -.5134102     .552497
                     UKI  |   1.049842   .3034162     3.46   0.001     .4551572    1.644527
                     UKJ  |   .4702884   .2704005     1.74   0.082    -.0596869    1.000264
                     UKK  |   .6620488   .2688419     2.46   0.014     .1351284    1.188969
                     UKL  |  -.1360524   .3978985    -0.34   0.732    -.9159192    .6438144
                     UKM  |   .4267173   .3557987     1.20   0.230    -.2706354     1.12407
                          |
                     race |
                   Other  |  -.0753115   .2417285    -0.31   0.755    -.5490905    .3984676
                   Asian  |  -1.598226   .2043739    -7.82   0.000    -1.998791    -1.19766
                   Black  |  -1.515003   .2294463    -6.60   0.000    -1.964709   -1.065296
                          |
                 children |
                     1-2  |  -.7865049   .1041824    -7.55   0.000    -.9906987   -.5823111
                      3+  |  -1.521084   .3325642    -4.57   0.000    -2.172898   -.8692707
                          |
           marital_status |
                  couple  |  -.0712587   .1061237    -0.67   0.502    -.2792574      .13674
        divorced/widowed  |  -.0374006   .1337996    -0.28   0.780    -.2996431    .2248418
                          |
                    h_sex |
                  female  |   .0512567   .0706466     0.73   0.468    -.0872082    .1897216
                  h_dvage |   .1037627    .014271     7.27   0.000     .0757921    .1317334
                    agesq |  -.0009269   .0001426    -6.50   0.000    -.0012064   -.0006475
                          |
              h_qfhigh_dv |
1st degree or equivalent  |  -.2797322   .1059448    -2.64   0.008    -.4873802   -.0720842
           Diploma in he  |  -1.583601   .1796644    -8.81   0.000    -1.935736   -1.231465
  Teaching qual not pgce  |  -.9392009   .2254014    -4.17   0.000     -1.38098   -.4974222
  Nursing/other med qual  |  -1.384121    .231815    -5.97   0.000     -1.83847   -.9297715
     Other higher degree  |   -.407143   .8564745    -0.48   0.635    -2.085802    1.271516
                 A level  |  -1.202543   .1364104    -8.82   0.000    -1.469902   -.9351835
     Welsh baccalaureate  |  -12.53504   .5325564   -23.54   0.000    -13.57884   -11.49125
 I'nationl baccalaureate  |  -1.512723   1.072077    -1.41   0.158    -3.613954    .5885088
                AS level  |  -1.254961   .4733463    -2.65   0.008    -2.182703   -.3272194
          Highers (scot)  |  -.8733949   .2883932    -3.03   0.002    -1.438635   -.3081545
   Cert 6th year studies  |  -2.187892   .7674702    -2.85   0.004    -3.692106   -.6836785
            GCSE/O level  |  -2.355731   .1342771   -17.54   0.000     -2.61891   -2.092553
                     CSE  |  -3.709495   .3285078   -11.29   0.000    -4.353358   -3.065631
        Standard/o/lower  |  -2.285304   .3876992    -5.89   0.000     -3.04518   -1.525428
       Other school cert  |  -3.093959   .4122799    -7.50   0.000    -3.902013   -2.285905
       None of the above  |  -3.699966   .2107089   -17.56   0.000    -4.112948   -3.286984
                          |
                    _cons |  -3.034039   .4522148    -6.71   0.000    -3.920364   -2.147715
--------------------------+----------------------------------------------------------------
paucivore                 |
             import_shock |  -.4119889    .195852    -2.10   0.035    -.7958518   -.0281261
                     poor |  -.3189403   .0670919    -4.75   0.000    -.4504381   -.1874425
                          |
                    class |
                       2  |   .3197742   .0836234     3.82   0.000     .1558754     .483673
                       3  |   .2080776   .0624033     3.33   0.001     .0857694    .3303859
                       4  |    .052652   .0909246     0.58   0.563     -.125557     .230861
                       5  |   .1911196   .0952221     2.01   0.045     .0044877    .3777515
                       6  |  -.1915671   .1263857    -1.52   0.130    -.4392786    .0561444
                       8  |  -.2009409   .0666757    -3.01   0.003     -.331623   -.0702589
                          |
                       NC |
                     UKD  |   -.007566   .1768722    -0.04   0.966    -.3542291    .3390971
                     UKE  |  -.0305548   .1845862    -0.17   0.869     -.392337    .3312274
                     UKF  |   .0658073   .1923954     0.34   0.732    -.3112808    .4428954
                     UKG  |   .0137894   .1751666     0.08   0.937    -.3295308    .3571096
                     UKH  |   .0855113    .191234     0.45   0.655    -.2893005    .4603231
                     UKI  |   .3052475   .1963761     1.55   0.120    -.0796427    .6901377
                     UKJ  |   .1761566   .1688617     1.04   0.297    -.1548063    .5071194
                     UKK  |    .209957   .1779608     1.18   0.238    -.1388398    .5587538
                     UKL  |   -.158237   .1835557    -0.86   0.389    -.5179995    .2015255
                     UKM  |   .2259357   .1853443     1.22   0.223    -.1373325     .589204
                          |
                     race |
                   Other  |  -.0513491    .151015    -0.34   0.734    -.3473331    .2446349
                   Asian  |  -.8766191   .0966497    -9.07   0.000    -1.066049   -.6871891
                   Black  |  -.7926088   .1385348    -5.72   0.000    -1.064132   -.5210855
                          |
                 children |
                     1-2  |  -.2592035   .0583466    -4.44   0.000    -.3735607   -.1448463
                      3+  |  -.6089867   .1242846    -4.90   0.000    -.8525801   -.3653933
                          |
           marital_status |
                  couple  |   .0743112   .0689212     1.08   0.281     -.060772    .2093943
        divorced/widowed  |  -.1727043   .0791187    -2.18   0.029    -.3277741   -.0176344
                          |
                    h_sex |
                  female  |   .1872058   .0456631     4.10   0.000     .0977077    .2767038
                  h_dvage |   .0358196   .0074459     4.81   0.000     .0212259    .0504133
                    agesq |  -.0002165   .0000693    -3.12   0.002    -.0003524   -.0000807
                          |
              h_qfhigh_dv |
1st degree or equivalent  |  -.1706083   .0749225    -2.28   0.023    -.3174537    -.023763
           Diploma in he  |  -.7643314   .0912368    -8.38   0.000    -.9431523   -.5855105
  Teaching qual not pgce  |   -.497487   .1358513    -3.66   0.000    -.7637507   -.2312233
  Nursing/other med qual  |  -.9039899   .1248843    -7.24   0.000    -1.148759   -.6592212
     Other higher degree  |  -.1765162   .6164255    -0.29   0.775    -1.384688    1.031656
                 A level  |  -.5545536   .0786874    -7.05   0.000    -.7087781   -.4003291
     Welsh baccalaureate  |   -1.51548    .825522    -1.84   0.066    -3.133473    .1025135
 I'nationl baccalaureate  |   .0570557   .7154552     0.08   0.936    -1.345211    1.459322
                AS level  |      -.709    .211295    -3.36   0.001    -1.123131   -.2948694
          Highers (scot)  |  -.8680638   .1713602    -5.07   0.000    -1.203924   -.5322039
   Cert 6th year studies  |  -.7516513   .3556732    -2.11   0.035    -1.448758   -.0545447
            GCSE/O level  |  -1.258174   .0693652   -18.14   0.000    -1.394127    -1.12222
                     CSE  |  -1.817367   .1250545   -14.53   0.000    -2.062469   -1.572265
        Standard/o/lower  |  -1.587936   .1709081    -9.29   0.000     -1.92291   -1.252963
       Other school cert  |  -1.464141   .1326915   -11.03   0.000    -1.724211    -1.20407
       None of the above  |  -2.189485   .0856218   -25.57   0.000      -2.3573   -2.021669
                          |
                    _cons |  -.7619637   .2741064    -2.78   0.005    -1.299202   -.2247249
--------------------------+----------------------------------------------------------------
univore                   |  (base outcome)
-------------------------------------------------------------------------------------------

. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/pierostanig/Library/CloudStorage/OneDrive-UniversitàCommercialeLuigiBocconi/CPS paper/
> ChanReplication.log
  log type:  text
 closed on:  28 May 2024, 16:28:43
-----------------------------------------------------------------------------------------------------------
